package org.androidannotations.gradle.view.activity;

import android.app.Activity;
import android.view.View;
import android.widget.TextView;

import org.androidannotations.annotations.AfterViews;
import org.androidannotations.annotations.App;
import org.androidannotations.annotations.Bean;
import org.androidannotations.annotations.Click;
import org.androidannotations.annotations.EActivity;
import org.androidannotations.annotations.FragmentById;
import org.androidannotations.annotations.ViewById;
import org.androidannotations.annotations.res.StringRes;
import org.androidannotations.gradle.AppContext;
import org.androidannotations.gradle.MyClass;
import org.androidannotations.gradle.R;
import org.androidannotations.gradle.view.fragment.MyFragment;

import java.util.Date;

@EActivity(R.layout.main)
public class GlideDemoActivity extends Activity {

	@App
	AppContext context;

	@Bean
	MyClass myClass;

	@StringRes
	String hello;

	@ViewById
	TextView helloTextView;

	@FragmentById
	MyFragment myFragment;

	@Click
	void btnListDemo(View view){

	}

	@AfterViews
	void afterViews() {
		Date now = new Date();
		String helloMessage = String.format(hello, now.toString());
		helloTextView.setText(helloMessage);
	}
}
